package com.iad.controller.event {
  
  import flash.events.Event;
  
  /**
   * This class represent the event that is dispatched when a service is successful.
   * 
   */
  public class ServiceResultEvent extends Event {
    
    /**
     * The constant defining the result event type.
     */
     
    public static const DELETE_SONG_RESULT:String = "deleteSongResult"; 
    public static const DO_LOGIN_RESULT:String = "doLoginResult"; 
    public static const GET_MAIN_PAGES_RESULT:String = "getMainPagesResult"; 
    public static const GET_SITE_PAGES_RESULT:String = "getSitePagesResult"; 
    public static const SAVE_PAGE_RESULT:String = "savePageResult"; 
    public static const SAVE_PAGES_RESULT:String = "savePagesResult"; 
    public static const GET_PLAYLIST_FROM_NEW_SITE_RESULT:String = "getPlaylistFromNewSiteResult"; 
    public static const GET_PLAYLIST_RESULT:String = "getPlaylistResult"; 
    public static const GET_SITE_PLAYLISTS_RESULT:String = "getSitePlaylistsResult"; 
    public static const GET_SITE_VIDEOS_RESULT:String = "getSiteVideosResult"; 
    public static const NEW_SITE_RESULT:String = "newSiteResult"; 
    public static const GET_SITE_RESULT:String = "getSiteResult"; 
    public static const GET_SITE_BY_LABEL_RESULT:String = "getSiteResult"; 
    public static const GET_SITES_RESULT:String = "getSitesResult"; 
    public static const GET_USERS_RESULT:String = "getUsersResult"; 
    public static const GET_USER_RESULT:String = "getUserResult"; 
    public static const LOGIN_RESULT:String = "loginResult"; 
    public static const PROPERTIES_RESULT:String = "propertiesResult"; 
    public static const RESULT:String = "result"; 
    public static const SUBMIT_REVIEW_RESULT:String = "submmitReviewResult"; 
    public static const GET_REVIEWS_RESULT:String = "getReviewsResult"; 
    public static const GET_NEW_REVIEWS_RESULT:String = "getNewReviewsResult"; 
    public static const APPROVE_NEW_REVIEWS_RESULT:String = "approveNewReviewsResult"; 
    public static const SEND_CONTACT_MESSAGE_RESULT:String = "sendContactMessageResult"; 
    public static const SEND_WELCOME_EMAIL_RESULT:String = "sendWelcomeEmailResult"; 
    
    /**
     * The data returned from the service.
     */
    [Bindable]
    public var result:Object;
    
    /**
     * @param type (String)
     * @param result (Object)
     * @param bubbles (Boolean)
     * @param cancelable (Boolean)
     */
    public function ServiceResultEvent(type:String, result:Object, bubbles:Boolean = false, cancelable:Boolean = false) {
      super(type, bubbles, cancelable);
      this.result = result;
    }
    
    /**
     * @see flash.events.Event#clone
     */
    public override function clone():Event {
      return new ServiceResultEvent(type, result, bubbles, cancelable);
    }
    
  }
  
}